package com.cmc.cloud.cmclink.doc.vo.portdesc;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 港口描述 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PortDescBaseVO {

    @Schema(description = "港口编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{portDescBaseVo.portcode.notblank}")
    @Length(max = 5, message = "{portDescBaseVo.portcode.length}")
    private String portCode;

    @Schema(description = "港口描述", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{portDescBaseVo.portdesc.notblank}")
    @Length(max = 50, message = "{portDescBaseVo.portdesc.length}")
    private String portDesc;

    @Schema(description = "排序")
    private Integer sortNo;

    @Schema(description = "是否可用", example = "true,false")
    private Boolean enable;

    @Schema(description = "是否默认", example = "true,false")
    private Boolean defaultFlag;

}
